#!/bin/sh
DATE=$(date '+%Y-%m-%d %H:%M:%S')
export PATH=/home/jdk1_7_0_75/bin:$PATH  
export JAVA_HOME=/home/jdk1_7_0_75  
export JRE_HOME=/home/jdk1_7_0_75/jre  
export CLASSPATH=/home/jdk1_7_0_75/lib:/home/jdk1_7_0_75/jre/lib:$CLASSPATH  
RUN_HOME=/opt/livenotesh/  
  
export CLASSPATH=$CLASSPATH
echo $DATE:${1#*/} >> /tmp/test.log 
echo $DATE:$1 >> /tmp/test.log
#curl -i -X POST -H 'Content-type':'text/json;charset=utf-8' -d "{\"id\":\"123456\", \"type\":\"m1_write_bullet\",\"action\":\"request\",\"videoID\":\"${1#*/}\"}"    http://123.57.253.199:8090/livenotes/livenotes/service/barrage/write   >>  /tmp/test.log
#cd  /opt/livenotesh
java -jar  /opt/livenotesh/writebarrage.jar   ${1#*/}  >> /tmp/test.log
echo -ne "#EXT-X-ENDLIST \n" >> /opt/pub/hls/${1#*/}.m3u8
echo -e "\n" >> /tmp/test.log
